import { _decorator, Component, Vec3, tween } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Toast')
export class Toast extends Component {
    start() {
        this.node.setPosition(0, 0)
        tween(this.node)
            .delay(0.5)
            .by(0.5, { position: new Vec3(0, 120, 0) })
            .call(() => {
                this.node.destroy()
            })
            .start()
    }
}


